<template>
    <view @click.stop  @touchmove.stop.prevent="" >
        <view class="my-load" :class="show?'show':'noShow'" @click="clickLoad()" v-if="show">
            <view class="cu-load load-modal">
                 <image class="img" :src="vuex_base.logo" mode="aspectFit"></image>
                 <view class="text">{{text}}</view>
             </view>
        </view>
    </view>
</template>

<script>
    export default {
        data() {
            return {}
        },
        props: {
            //文本
            text: {
                type: [String],
                default: '请稍后...',
            },
            //显示
            show: {
                type: [Boolean, String],
                default: true,
            },
            //图片
            image: {
                type: [String],
                default: '',
            }
        },
        methods:{
            clickLoad(){
                this.$emit('click');
            }
        }
    }
</script>

<style lang="less">
    
.my-load{
    width: 100vw;
    height: 100vh;    
	position: fixed;
    z-index: 999;
	top: 0;
	right: 0;
}
.show{
    animation-name: fade;
    animation-duration: .2s;
    animation-timing-function: linear
}
.noShow{
    animation-name: fade;
    animation-duration: .1s;
    animation-timing-function: linear;
    animation-direction: reverse
}
</style>
